<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>propsData Option全局扩展的数据传递</title>
    <script src="../assets/js/vue.js"></script>
</head>
<body>
    <h1>propsData Option全局扩展的数据传递</h1>
    <hr>
    <div id="app">
        <header></header>
    </div>
</body>
<script>
   var header = Vue.extend({
       template:`<div>{{message}}---{{a}}</div>`,
       data:function(){
           return {
               message:"我是头部"
           }
       },
       props:['a']
   });
//    new header().$mount("header")
      new header({propsData:{a:2}}).$mount("header")
</script>
</html>